package it.slothy.noveleditor.gui;

import it.slothy.noveleditor.interfaces.MEJFrame;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JPanel;

public class HomeGUI extends MEJFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JMenuBar menuBar;
	private JPanel pnlLeft;
	
	/**
	 * Create the frame
	 */
	public HomeGUI() {
		Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
		setBounds(0, 0, (int)dimension.getWidth(), (int)dimension.getHeight() - 40);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		
		this.setVisible(true);
		this.setResizable(false);
		
		menuBar = new JMenuBar();
		setJMenuBar(menuBar);
		
		JMenu mnFile = new JMenu("File");
		menuBar.add(mnFile);
		
		pnlLeft = new JPanel();
		GroupLayout groupLayout = new GroupLayout(getContentPane());
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addComponent(pnlLeft, GroupLayout.DEFAULT_SIZE, 312, Short.MAX_VALUE)
					.addGap(1048))
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addComponent(pnlLeft, GroupLayout.DEFAULT_SIZE, 679, Short.MAX_VALUE)
		);
		GroupLayout gl_pnlLeft = new GroupLayout(pnlLeft);
		gl_pnlLeft.setHorizontalGroup(
			gl_pnlLeft.createParallelGroup(Alignment.LEADING)
				.addGap(0, 312, Short.MAX_VALUE)
		);
		gl_pnlLeft.setVerticalGroup(
			gl_pnlLeft.createParallelGroup(Alignment.LEADING)
				.addGap(0, 679, Short.MAX_VALUE)
		);
		pnlLeft.setLayout(gl_pnlLeft);
		getContentPane().setLayout(groupLayout);
	}
}
